package org.fgtv.gospel.domain;
// Generated 2011. 5. 22 오후 5:00:36 by Hibernate Tools 3.2.2.GA


import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * 게시물 정보를 저장하는 클래스 입니다.
 * @author bumbooForest(with help from Hibernate)
 *         
 */
@Entity
@Table(name="BoardContent"
)
public class BoardContent  implements java.io.Serializable {


     private int id;
     /**
      * 카테고리ID
     */
     private String categoryId;
     /**
      * 게시물제목
     */
     private String title;
     /**
      * 내용
     */
     private String content;
     /**
      * 첨부파일ID
     */
     private int attachedFileId;
     /**
      * 신규일
     */
     private Date newDate;
     /**
      * 변경일
     */
     private String modifyDate;
     private User user;
     private Board Board;

    public BoardContent() {
    }

	
    public BoardContent(String categoryId, String title, String content, int attachedFileId, Date newDate, String modifyDate) {
        this.categoryId = categoryId;
        this.title = title;
        this.content = content;
        this.attachedFileId = attachedFileId;
        this.newDate = newDate;
        this.modifyDate = modifyDate;
    }
    public BoardContent(String categoryId, String title, String content, int attachedFileId, Date newDate, String modifyDate, User user, Board Board) {
       this.categoryId = categoryId;
       this.title = title;
       this.content = content;
       this.attachedFileId = attachedFileId;
       this.newDate = newDate;
       this.modifyDate = modifyDate;
       this.user = user;
       this.Board = Board;
    }
   
     @Id @GeneratedValue
    
    @Column(name="ID", nullable=false)
    public int getId() {
        return this.id;
    }
    
    protected void setId(int id) {
        this.id = id;
    }
    /**       
     *      * 카테고리ID
     */
    
    @Column(name="categoryId", nullable=false, length=2)
    public String getCategoryId() {
        return this.categoryId;
    }
    
    public void setCategoryId(String categoryId) {
        this.categoryId = categoryId;
    }
    /**       
     *      * 게시물제목
     */
    
    @Column(name="title", nullable=false, length=100)
    public String getTitle() {
        return this.title;
    }
    
    public void setTitle(String title) {
        this.title = title;
    }
    /**       
     *      * 내용
     */
    
    @Column(name="content", nullable=false, length=3000)
    public String getContent() {
        return this.content;
    }
    
    public void setContent(String content) {
        this.content = content;
    }
    /**       
     *      * 첨부파일ID
     */
    
    @Column(name="attachedFileId", nullable=false, length=3)
    public int getAttachedFileId() {
        return this.attachedFileId;
    }
    
    public void setAttachedFileId(int attachedFileId) {
        this.attachedFileId = attachedFileId;
    }
    /**       
     *      * 신규일
     */
    @Temporal(TemporalType.DATE)
    @Column(name="newDate", nullable=false)
    public Date getNewDate() {
        return this.newDate;
    }
    
    public void setNewDate(Date newDate) {
        this.newDate = newDate;
    }
    /**       
     *      * 변경일
     */
    
    @Column(name="modifyDate", nullable=false, length=30)
    public String getModifyDate() {
        return this.modifyDate;
    }
    
    public void setModifyDate(String modifyDate) {
        this.modifyDate = modifyDate;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="id")
    public User getUser() {
        return this.user;
    }
    
    public void setUser(User user) {
        this.user = user;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="id")
    public Board getBoard() {
        return this.Board;
    }
    
    public void setBoard(Board Board) {
        this.Board = Board;
    }




}


